<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
ul{
list-style:none;
}
body{
font-family:굴림;
font-size:9pt;
}
/*
*{
margin:10px;
padding:10px;
}
*/
/* id가 nowDate만 수정됨 */
#nowDate{
border:0px;
}
/* 사용자가 임의로 만듬 */
.myText{
border:1px solid;
}
</style>
<script type="text/javascript">
function sendIt(){
	var f = document.myForm;
	if (!f.userId.value) {
		alert("아이디를 넣으세요.");
		f.userId.focus();
		return;
	}
	
	if (!f.userPwd.value) {
		alert("패스워드를 넣으세요.");
		f.userPwd.focus();
		return;
	}
	
	if (!f.userName.value) {
		alert("이름를 넣으세요.");
		f.userName.focus();
		return;
	}
	
	if (!f.tel1.value) {
		alert("선택하세요.");
		f.tel1.focus();
		return;
	}
	
	alert("회원가입 완료!!");
}

function onlyNum(){
	if (event.keyCode < 48 || event.keyCode > 57) {
		event.returnValue=false;
	}
}

function hangul(){
	if (event.keyCode < 12592 || event.keyCode > 12687) {
		event.returnValue=false;
	}
}

function showClock(){
	var now = new Date();
	var y = now.getYear();
	var m = now.getMonth()+1;
	if (m<10) {
		m='0'+m;
	}

	var d = now.getDate();
	if (d<10) {
		d='0'+d;
	}

	var h = now.getHours();
	var mm = now.getMinutes();
	var s = now.getSeconds();
	var ampm = "오전";
	if (h>=12) {
		ampm = "오후";
	}
	if (h>12) {
		h=h-12;
	}
	if (mm<10) {
		mm='0'+mm;
	}
	if (s<10) {
		s='0'+s;
	}

	var temp = y+"-"+m+"-"+d;
	temp+=" "+ampm;
	temp+=h+":"+mm+":"+s;
	document.getElementById("nowDate").value=temp;

	//자기 자신을 호출 
	setTimeout('showClock()',1000);
}
</script>
</head>
<body onload="showClock();">
<h4>순서없는 목록</h4>
<ul>
<li>홍길동</li>
<li>이순신</li>
<li>김유신</li>
</ul>
<h4>순서있는 목록</h4>
<ol>
<li>홍길동</li>
<li>이순신</li>
<li>김유신</li>
</ol>
<h4>
dl : 목록정의, dt : 목록제목, dd : 데이터
</h4>
<dl>
<dt>컴퓨터</dt>
<dd>모니터</dd>
<dd>CPU</dd>
<dd>메모리</dd>
</dl>

<br>
<div></div>
<div style="background:#00ff00;">한줄전체</div>
<div style="float:left;background:#ffff00;">내용1</div>
<div style="float:right;background:#ff00ff;">내용2</div>
<div style="float:left;background:#ff0000;">내용3</div>
<div style="float:right;background:#00ffff;">내용4</div>

<br>
<span style="background:red;">입력내용만큼</span>
<span style="background:red;">입력내용만큼</span>
<span style="background:red;"></span>
<br><br><br><br>

<form action="" method="post" name="myForm">
아이디 : <input type="text" name="userId" class="myText"/><br>
패스워드 : <input type="password" name="userPwd" class="myText"/><br>
이름 : <input type="text" name="userName" onkeypress="hangul();" class="myText"/><br>
성별 : <input type="radio" name="sung" checked="checked" value="m"/>남자<br>
<input type="radio" name="sung" value="f"/>여자<br>

전화 : 
<select name="tel1">
<option value="">===선택===</option>
<option value="010" selected="selected">010</option>
<option value="070">070</option>
<option value="031">031</option>
<option value="051">051</option>
</select>

<input type="text" name="tel2" onkeypress="onlyNum();"/>-
<input type="text" name="tel3" onkeypress="onlyNum();"/><br>

동의합니까?<input type="checkbox" name="chk" value="y"><br>
메모<textarea rows="5" cols="20" name="memo"></textarea><br>

<input type="button" value="회원가입" onclick="sendIt();"/>
<input type="reset" value="다시입력"/>
<input type="button" value="취소"/>


</form>
<br><br><br><br>
<input type="text" size="30" id="nowDate" readonly="readonly"/>
</body>
</html>












